Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compact Invoke-PowerShellTcpOneLine.ps1 #94

Closed
wants to merge 1 commit into from
Closed

Compact Invoke-PowerShellTcpOneLine.ps1 #94

wants to merge 1 commit into from

Conversation

fun840
Copy link

@fun840 fun840 commented Mar 26, 2022

I compacted down one of the shells in Invoke-PowerShellTcpOneLine.ps1, since it seems like it's purpose is to be as small as possible, but there were more optimizations that could be made. The old length was 282 characters, now it's 226. I renamed some of the 2-letter variables to 1 letter, changed some of the function calls (like creating the TCPClient object), saved the [Text.Encoding]::ASCII object to a variable (since it's used twice), and some other small things like removing unnecessary semicolons.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants